﻿
using GCC.Container.Abstracts;

namespace System.IMServer.TextMessageCenter
{
    public class GCCEntrance : AbsEntrance
    {
        public override bool IsRelease()
        {
#if DEBUG
            return false;
#else 
            return true;
#endif
        }

        public override string Name()
        {
            return "System.IMServer";
        }

        public override Version NeedsApiContainerVersion()
        {
            return new Version(0, 0, 0, 0);
        }

        public override void OnGetDBInstance()
        {
        }

        public override void OnSystemStarted(AbsGCCContext context)
        {

            MessageCenterServer.Instance.Init(context, GCCLoggerProvider!);
            MessageCenterServer.Instance.Start();
        }

        public override void SystemTryShutDown()
        {
        }
    }
}
